public class TriangleCalculator {

    public static void calculateArea(int a, int b) {
        double area = (a * b) / 2.0;
        System.out.println("直角三角形的面积为: " + area);
    }

    public static void calculateArea(double a, double b) {
        double area = (a * b) / 2.0;
        System.out.println("直角三角形的面积为: " + area);
    }

    public static void main(String[] args) {
        // 调用 int 类型边长计算
        calculateArea(3, 4);

        // 调用 double 类型边长计算
        calculateArea(3.5, 4.5);
    }
}
